﻿<controls:ChildWindow
    x:Class="ibba.src.noriskbo.PageGarantiasSemContrato"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
    xmlns:local="clr-namespace:ibba.src.noriskbo"
    xmlns:slc="clr-namespace:ibba.src.sl.componentes;assembly=ibba.src.sl.componentes"
    mc:Ignorable="d"
    d:DesignHeight="400" d:DesignWidth="800"
    Title="NORISKBO"
    >

    <controls:ChildWindow.Style>
        <StaticResource ResourceKey="ChildWindowStyle"/>
    </controls:ChildWindow.Style>
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="85" />
        </Grid.RowDefinitions>
		
        <TextBlock Grid.Row="0" Text="Garantias associadas a contratos inexistentes" Style="{StaticResource TitleHeader}"  />
		
        <sdk:DataGrid Name="dataGridGarantias" ItemsSource="{Binding}" Grid.Row="1" 
					  GridLinesVisibility="All" AutoGenerateColumns="False" 
					  VerticalScrollBarVisibility="Auto" VerticalAlignment="Stretch"
					  Margin="5,0,5,10" IsReadOnly="True">
            <sdk:DataGrid.Columns>
                <sdk:DataGridTextColumn Header="Contrato" Binding="{Binding CodigoContrato}" MinWidth="150" Width="Auto" />
                <sdk:DataGridTextColumn Header="Número" Binding="{Binding Numero}" MinWidth="75" Width="Auto" /> 
                <sdk:DataGridTextColumn Header="Instrumento" Binding="{Binding DescricaoInstrumento}" MinWidth="120" Width="Auto" /> 
                <sdk:DataGridTextColumn Header="Bem" Binding="{Binding DescricaoBem}" MinWidth="120" Width="Auto" /> 
                <sdk:DataGridTextColumn Header="Natureza" Binding="{Binding DescricaoNatureza}" MinWidth="120" Width="Auto" />
                <sdk:DataGridTextColumn Header="Moeda" Binding="{Binding Moeda}" MinWidth="50" Width="Auto" />
                <sdk:DataGridTextColumn Header="Valor atualizado" Binding="{Binding ValorAtualizado, Converter={StaticResource DecimalConverter}}" MinWidth="120" Width="Auto" />
                <sdk:DataGridTextColumn Header="Origem" Binding="{Binding DescricaoOrigem}" MinWidth="60" Width="Auto" />
                <sdk:DataGridTextColumn Header="Status" Binding="{Binding DescricaoStatus}" MinWidth="90" Width="Auto" />
                <sdk:DataGridTemplateColumn> 
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button Name="btnDetalheGarantia" Click="btnDetalheGarantia_Click">
                                <Image Source="{StaticResource IconeVerDetalhes}" Width="16" Height="16" />
                            </Button>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
            </sdk:DataGrid.Columns>
            <sdk:DataGrid.RowGroupHeaderStyles>
                <Style TargetType="sdk:DataGridRowGroupHeader">
                    <Setter Property="sdk:DataGridRowGroupHeader.PropertyNameVisibility" Value="Collapsed" />
                    <Setter Property="Control.Background" Value="#FF7198BF" />
                    <Setter Property="Control.Foreground" Value="#FFEEEEEE" />
                    <Setter Property="sdk:DataGridRowGroupHeader.SublevelIndent" Value="10" />
                </Style>
                <Style TargetType="sdk:DataGridRowGroupHeader">
                    <Setter Property="Control.Background" Value="#44225566" />
                </Style>
            </sdk:DataGrid.RowGroupHeaderStyles>
        </sdk:DataGrid>

        <slc:ControlMenuBar x:Name="barraMenu" Grid.Row="2" BorderRadius="15,0,15,0" VisibilityUserPanel="Collapsed"
                            Background="{StaticResource BlueStrong}"/>
    </Grid>
</controls:ChildWindow>